<template>
  <div>
    <h2>router-demo</h2>
    <p>
      <RouterLink to="/home">系统首页</RouterLink> |
      <RouterLink to="/banner">轮播图管理</RouterLink> |
      <RouterLink to="/project">产品管理</RouterLink> |
      <RouterLink to="/detail/1234">详情页1</RouterLink> |
      <RouterLink to="/detail/4567">详情页2</RouterLink> |
      <RouterLink to="/cart">购物车</RouterLink>
    </p>

    <hr />

    <RouterView />

    <!-- 命名视图的接收 -->
    <RouterView name="a" />
    <RouterView name="b" />
  </div>
</template>

<style>
.router-link-active {
  color: red;
}
</style>
